package Cafezam;

import java.util.Scanner;

public class J10Retangle {
	public static void main(String[] args)
	{
		double width,height,area,perimeter;
		String color;
		
		
		width=getwidth(makeScanner());
		height=getheight(makeScanner());
		color=getcolor(makeScanner());
		
		area=getArea(width, height);
		perimeter=getperimeter(width, height);
		System.out.println("면적은:"+area);
		System.out.println("둘레는:"+perimeter);
		System.out.println("색깔은"+color);
		
		
	}

	private static String getcolor(Scanner sc) {
		String color;
		System.out.println("색상은");
		color=sc.next();
		closeScanner(sc);
		return color;
	}

	private static double getheight(Scanner sc) {
		int height;
		System.out.println("세로는");
		height=sc.nextInt();
		return height;
	}

	private static double getwidth(Scanner sc) {
		int width;
		System.out.println("가로는");
		width=sc.nextInt();
		return width;
	}

	private static Scanner makeScanner() {
		Scanner sc =new Scanner(System.in);
		return sc;
		
	}
	private static void closeScanner(Scanner sc)
	{
		sc.close();
		
	}

	private static double getperimeter(double width, double height) {
		
		return (width+height)*2;
	}

	private static double getArea(double width, double height) 
	{
		
		return width*height;
	}
	


}
